package com.sinosoft.mcp.server.mysql.config;

import com.sinosoft.mcp.server.mysql.service.MySQLService;
import com.sinosoft.mcp.server.mysql.service.ProductService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class McpServerConfig implements WebMvcConfigurer {

    @Bean
    public ToolCallbackProvider myTools(MySQLService mySQLService, ProductService productService) {
        return MethodToolCallbackProvider.builder().toolObjects(mySQLService, productService).build();
    }

}